var vod_big_class = ''
var next_page
module.exports = {
  type: 'list',
  title: '芭樂->类型选择',
  actions: [
    {
      title: '国产精品',
      onClick: async function () {
        vod_big_class = '58'
        this.refresh()
      }
    },
    {
      title: 'AV剧情',
      onClick: async function () {
        vod_big_class = '29'
        this.refresh()
      }
    },
    {
      title: '职场同事',
      onClick: async function () {
        vod_big_class = '44'
        this.refresh()
      }
    },
    {
      title: '芭樂推荐',
      onClick: async function () {
        vod_big_class = '30'
        this.refresh()
      }
    },
    {
      title: '制服诱惑',
      onClick: async function () {
        vod_big_class = '5'
        this.refresh()
      }
    },
    {
      title: '人妻熟女',
      onClick: async function () {
        vod_big_class = '6'
        this.refresh()
      }
    },
    {
      title: '巨乳美乳',
      onClick: async function () {
        vod_big_class = '42'
        this.refresh()
      }
    },
    {
      title: '激情女教师',
      onClick: async function () {
        vod_big_class = '48'
        this.refresh()
      }
    },
    {
      title: '网红主播',
      onClick: async function () {
        vod_big_class = '17'
        this.refresh()
      }
    },
    {
      title: 'H动漫',
      onClick: async function () {
        vod_big_class = '14'
        this.refresh()
      }
    },
    {
      title: '欧美AV',
      onClick: async function () {
        vod_big_class = '16'
        this.refresh()
      }
    },
    {
      title: '高清无码',
      onClick: async function () {
        vod_big_class = '1'
        this.refresh()
      }
    },
    {
      title: '飞机篇',
      onClick: async function () {
        vod_big_class = '54'
        this.refresh()
      }
    },
    {
      title: '三级电影',
      onClick: async function () {
        vod_big_class = '25'
        this.refresh()
      }
    },
    {
      title: '国产自拍',
      onClick: async function () {
        vod_big_class = '10'
        this.refresh()
      }
    },
    {
      title: '痴女萌娘',
      onClick: async function () {
        vod_big_class = '22'
        this.refresh()
      }
    },
    {
      title: '无码破坏版',
      onClick: async function () {
        vod_big_class = '47'
        this.refresh()
      }
    },
    {
      title: '名优荟萃',
      onClick: async function () {
        vod_big_class = '9'
        this.refresh()
      }
    },
    {
      title: '痴汉联盟',
      onClick: async function () {
        vod_big_class = '46'
        this.refresh()
      }
    },
    {
      title: 'DRP©出品',
      onClick: async function () {
        vod_big_class = '55'
        this.refresh()
      }
    },
    {
      title: '业余素人',
      onClick: async function () {
        vod_big_class = '24'
        this.refresh()
      }
    },
    {
      title: '捆绑调教',
      onClick: async function () {
        vod_big_class = '49'
        this.refresh()
      }
    },
    {
      title: '禁忌乱伦',
      onClick: async function () {
        vod_big_class = '45'
        this.refresh()
      }
    },
    {
      title: '风俗按摩',
      onClick: async function () {
        vod_big_class = '52'
        this.refresh()
      }
    },
    {
      title: '少女萝莉',
      onClick: async function () {
        vod_big_class = '51'
        this.refresh()
      }
    },
    {
      title: '外流视频',
      onClick: async function () {
        vod_big_class = '32'
        this.refresh()
      }
    },
    {
      title: '嫩模专区',
      onClick: async function () {
        vod_big_class = '37'
        this.refresh()
      }
    },
    {
      title: '长腿丝袜',
      onClick: async function () {
        vod_big_class = '11'
        this.refresh()
      }
    },
    {
      title: '自慰喷水',
      onClick: async function () {
        vod_big_class = '57'
        this.refresh()
      }
    },
    {
      title: '明星淫梦',
      onClick: async function () {
        vod_big_class = '40'
        this.refresh()
      }
    },
    {
      title: '盗窃偷拍',
      onClick: async function () {
        vod_big_class = '53'
        this.refresh()
      }
    },
    {
      title: '角色扮演',
      onClick: async function () {
        vod_big_class = '4'
        this.refresh()
      }
    },
    {
      title: '群交淫乱',
      onClick: async function () {
        vod_big_class = '43'
        this.refresh()
      }
    },
    {
      title: '重咸口味',
      onClick: async function () {
        vod_big_class = '23'
        this.refresh()
      }
    },
    {
      title: '女同性爱',
      onClick: async function () {
        vod_big_class = '38'
        this.refresh()
      }
    },
    {
      title: '259LUXU',
      onClick: async function () {
        vod_big_class = '36'
        this.refresh()
      }
    },
    {
      title: '恐怖色情',
      onClick: async function () {
        vod_big_class = '35'
        this.refresh()
      }
    },
    {
      title: '人妖伪娘',
      onClick: async function () {
        vod_big_class = '56'
        this.refresh()
      }
    }
  ],
  searchRoute: $route('list'),
  async fetch({ args, page }) {
    var resp
    var itmes
    if (page == null) {
      resp = await $http.post(
        'https://api.blbe2.xyz/api/v1/video/list?page=1&uuid=6223a5702102'+Math.ceil(Math.random()*1000)+'&device=0', {
        sortId: vod_big_class,
        tagId:''
      })
        
      //next_page = resp.data.result.next_page_url
      //console.log(resp.data.result)
      
    } else {
      //console.log(`http://bljk3.com/api/v1/video/list?page=${page || 1}&uuid=6223a5702102`+Math.ceil(Math.random()*1000)+`&device=0`)
      resp = await $http.post(`http://bljk3.com/api/v1/video/list?page=${page || 1}&uuid=6223a5702102b8d5&device=0`), {
        sortId: vod_big_class,
        tagId:''
      }
      //console.log(resp)
    }
    itmes = resp.data.result.data.map(data => ({
      style: 'live',
      title: data.title,
      image: data.image,
      route: $route('xj/detail', {
        id: data.id,
        title:data.title,
        type: 'bl',
        detailimage: data.image
      })
    }))
    
    return {
      nextPage: (page || 1) + 1,
      items: itmes
    }
  }
}
